|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | TIMER_PERIOD 80 |
Functions | |
| void | main (void) |
| void | ADC10_ISR (void) |
| void | TA0_ISR (void) |
| #define TIMER_PERIOD 80 |
ADC10B - Sample A1 input, 1.5V Shared Ref, LED ON if A1 > 0.5V
MSP430FR573x Demo A single sample is made on A1 with reference to internal 1.5V Vref.Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10B internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10B conversion complete, ADC10_ISR will force exit from LPM0 in Mainloop on reti. If A1 > 0.5V, P1.0 set, else reset.
MSP430FR5739
-----------------
/|\| XIN|-
| | |
--|RST XOUT|-
| P1.1/A1|<- Sample Signal
| P1.0|-> LED
| P3.5|-->LED
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
TIMER0_A0_VECTOR
Built with IAR Embedded Workbench Version: 5.40 & Code Composer Studio V5.1
Definition at line 72 of file adc10_b_ex2_intRef.c.
| void ADC10_ISR | ( | void | ) |
Definition at line 203 of file adc10_b_ex2_intRef.c.
References __bic_SR_register_on_exit(), GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().
| void main | ( | void | ) |
Definition at line 74 of file adc10_b_ex2_intRef.c.
References __delay_cycles(), __no_operation(), and TIMER_PERIOD.
| void TA0_ISR | ( | void | ) |
Definition at line 276 of file adc10_b_ex2_intRef.c.